const collections={
    state:{
        collects:[],//初始化一个colects数组
    },
    getters:{
        renderCollects(state){//承载变化的collects
            return state.collects;
        }
    },
    mutations:{
        pushCollects(state,items){//如何变化collects，插入items
            state.collects.push(items);
        }
    },
    actions:{
        invokePushItem(context,item){//触发mutations里面的pushCollects ,传入数据形参item 对应到items
            context.commit('pushCollects',item);
        }
    }
}
export default collections